* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    text-decoration: none;
    list-style: none;
    scroll-behavior: smooth;
}

/* 主题色变量定义 */
:root {
    --primary-color: #a2ff63;
    --secondary-color: #4ECDC4;
    --accent-color: #7ff7e9;
    --bg-dark: rgba(26, 26, 46, 0.9);
    --glass-effect: blur(10px);
    --border-style: 1px solid rgba(255,255,255,0.1);
    --transition-timing: 0.3s ease;
}

body {
    background-image: url(./SourceMaterial/wanderer_v03_5120x2880.jpg);
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center top;
    background-attachment: scroll;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 0;
    gap: 0;
    overflow-x: hidden;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
}

.page-container {
    flex-grow: 1;
    display: flex;
    flex-direction: row;
    max-width: 100vw;
    margin: 0 auto;
    gap: 20px;
    padding: 20px;
    width: 100%;
    overflow: hidden;
}

/* 标题样式 */
#hero-heading,
#resources-heading {
    text-align: center;
    width: 100%;
    display: block;
}

.hero-section h2 {
    position: relative;
    padding: 0 20px;
}

/* 导航栏样式 */
.nav-container {
    width: 250px;
    min-width: 250px;
    flex: 0 0 auto;
    position: sticky;
    top: 20px;
    height: calc(100vh - 40px);
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: var(--glass-effect);
    border-radius: 15px;
    padding: 25px 15px;
    display: flex;
    flex-direction: column;
    gap: 30px;
    transition: 
        box-shadow var(--transition-timing),
        transform var(--transition-timing);
    border: var(--border-style);
    isolation: isolate;
}

.nav-container:hover {
    box-shadow: 0 0 20px rgba(223,143,255,0.2);
    transform: translateY(-2px);
}

/* LOGO样式 */
.logo-wrapper {
    flex-shrink: 0;
    width: 100%;
    mask-image: linear-gradient(90deg, transparent 0%, black 5%, black 95%, transparent 100%);
    overflow: hidden;
}

.logo-title {
    font-size: 1.8em;
    margin-bottom: 20px;
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 15px;
    color: #10f3eb;
    text-shadow: 
        2px 2px 3px rgba(223, 143, 255, 0.5),
        -1px -1px 2px rgba(22, 93, 245, 0.2);
    animation: logo-entrance 0.8s ease-out;
    word-break: break-word;
    max-width: 100%;
}

/* 导航菜单 */
.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.nav-menu li {
    border-bottom: 1px solid rgba(255, 255, 255, 0.099);
}

.nav-menu li:last-child {
    border-bottom: none;
}

.nav-menu a {
    color: var(--primary-color);
    padding: 12px 15px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.nav-menu a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(223, 143, 255, 0.3), transparent);
    transition: left 0.5s ease;
    z-index: -1;
}

.nav-menu a:hover::before {
    left: 100%;
}

/* 主要内容区域 */
.main-content {
    flex-grow: 1;
    max-width: calc(100vw - 250px - 100px - 60px);
    min-width: 0;
    padding: 30px;
    background: rgba(255,255,255,0.05);
    backdrop-filter: var(--glass-effect);
    border-radius: 15px;
    min-height: calc(100vh - 40px);
    display: grid;
    gap: 25px;
    border: var(--border-style);
    transition: 
        box-shadow var(--transition-timing),
        transform var(--transition-timing);
}

.main-content a {
    text-align: center;
    display: block;
    color: #4b09f3 !important;
}

.main-content a:hover {
    color: #05f3ff !important;
}

.main-content:hover {
    box-shadow: 0 0 20px rgba(78,205,196,0.15);
    transform: translateY(-2px);
}

/* 内容卡片 */
.content-card {
    background: rgba(0,0,0,0.2);
    padding: 25px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.1);
    transition: transform 0.3s ease;
}

.content-card:hover {
    transform: translateY(-5px);
}

.sidebar-announcement {
    flex: 0 0 280px;
    position: sticky;
    top: 20px;
    align-self: flex-start;
    height: fit-content;
    margin-left: auto;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.js .sidebar-announcement {
    opacity: 1;
}

.announcement-board {
    width: 100%;
    background: rgba(0,0,0,0.3);
    border-radius: 15px;
    backdrop-filter: var(--glass-effect);
    border: var(--border-style);
    padding: 20px;
    transition: 
        box-shadow var(--transition-timing),
        transform var(--transition-timing);
    overflow: hidden;
}

.announcement-board:hover {
    box-shadow: 0 0 20px rgba(162,255,99,0.2);
    transform: translateY(-2px);
}

.board-title {
    font-size: 1.1em;
    color: var(--primary-color);
    margin: -16px -16px 12px;
    padding: 12px 16px;
    background: linear-gradient(135deg, rgba(255,255,255,0.05), transparent);
    border-bottom: var(--border-style);
    border-radius: 8px 8px 0 0;
    position: relative;
    isolation: isolate;
}

.board-title::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(162,255,99,0.1),
        transparent
    );
    opacity: 0;
    transition: opacity var(--transition-timing);
    z-index: -1;
}

.announcement-board:hover .board-title::after {
    opacity: 1;
}

.board-content {
    font-size: 0.95em;
    line-height: 1.6;
    color: #e0e0e0;
    padding: 15px;
    background: rgba(0,0,0,0.1);
    border-radius: 0 0 8px 8px;
}

/* 响应式优化 */
@media (max-width: 1200px) {
    .page-container {
        flex-direction: column;
        gap: 20px;
    }
    
    .nav-container {
        width: 100%;
        height: auto;
        position: static;
        flex-direction: row;
        gap: 20px;
        padding: 15px;
        min-height: 80px;
    }
    
    .main-content {
        max-width: 100%;
        min-height: auto;
    }
    
    .sidebar-announcement {
        flex: 0 0 100%;
        order: 3;
        position: static;
        margin: 20px 0 0;
    }
    
    .announcement-board {
        border-radius: 10px;
    }
    
    .board-content {
        padding: 12px;
    }
}

@media (max-width: 768px) {
    .logo-title {
        font-size: 1.5em;
        gap: 10px;
        flex-direction: column;
    }
    
    .board-title {
        font-size: 1em;
    }
    
    .board-content {
        font-size: 0.9em;
        padding: 10px;
    }
    
    .sidebar-announcement {
        margin: 15px 0;
    }
    
    .announcement-board {
        padding: 15px 10px;
    }
}

/* 关键帧动画 */
@keyframes logo-entrance {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* 返回顶部 */
.back-to-top {
    position: fixed;
    right: 30px;
    bottom: 30px;
    padding: 12px;
    background: rgba(0,0,0,0.3);
    backdrop-filter: var(--glass-effect);
    border-radius: 50%;
    border: none;
    color: #10f3eb;
    cursor: pointer;
    transition: opacity 0.3s ease;
    opacity: 0.7;
}

.back-to-top:hover {
    opacity: 1;
}

/* 统一滚动条 */
* {
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.2) transparent;
}

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.2);
    border-radius: 4px;
    transition: background var(--transition-timing);
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.3);
}

@media (max-width: 768px) {
    .nav-container {
        flex-wrap: wrap;          /* 允许换行 */
        align-items: flex-start;  /* 不拉伸 */
        padding: 10px;
    }
    .nav-menu {
        flex-direction: row;      /* 与父级一致 */
        flex-wrap: wrap;
        gap: 6px;
        width: 100%;
    }
    .nav-menu li {
        flex: 1 1 auto;           /* 自动均分，不会压扁 */
        min-width: 110px;         /* 保证文字能显示 */
    }
    .nav-menu a {
        justify-content: center;
        padding: 10px 8px;
        font-size: 0.9em;
    }
}
